package com.test.rabforspringboot.provider;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class InitMessage {
    @Autowired
    private RabbitTemplate rabbitTemplate;


    public void sendMsg(){
        String str="hello,I'am comming";
        rabbitTemplate.convertAndSend("myQueue",str);
    }

}
